<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="common/include :: header('养修预约服务')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<form class="form-horizontal m" id="form-appointment-edit" th:object="${appointment}">
		<input type="hidden" name="id" th:field="*{id}"/>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">客户姓名：</label>
			<div class="col-sm-8">
				<input class="form-control" th:field="*{customerName}" type="text" name="customerName"  required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">联系方式：</label>
			<div class="col-sm-8">
				<input class="form-control"  th:field="*{customerPhone}" type="text" name="customerPhone"  required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">预约时间：</label>
			<div class="col-sm-8">
				<input class="form-control" th:value="${#dates.format(appointment.appointmentTime, 'yyyy-MM-dd HH:mm')}"
					   id="appointmentTime" type="text" name="appointmentTime"  required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">车牌号码：</label>
			<div class="col-sm-8">
				<input class="form-control" th:field="*{licensePlate}" type="text" name="licensePlate"  required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">汽车类型：</label>
			<div class="col-sm-8">
				<input class="form-control" th:field="*{carSeries}" type="text" name="carSeries"  required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">服务类型：</label>
			<div class="col-sm-8">
				<select name="serviceType" class="form-control m-b" th:with="type=${@dict.getType('cmi_service_type')}" required>
					<option th:each="dict : ${type}" th:text="${dict.label}" th:value="${dict.value}" th:field="*{serviceType}"></option>
				</select>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">备注信息：</label>
			<div class="col-sm-8">
				<textarea id="info" name="info" th:field="*{info}" class="form-control"></textarea>
			</div>
		</div>

	</form>
</div>
<th:block th:include="common/include :: footer" />
<th:block th:include="common/include :: datetimepicker" />
<script type="text/javascript">
	var prefix = ctx + "/business/appointment";

	function submitHandler() {
		if ($.validate.form()) {
			$.operate.save(prefix + "/edit", $('#form-appointment-edit').serialize());
		}
	}
	$("#appointmentTime").datetimepicker({
		format: "yyyy-mm-dd hh:ii",
		autoclose: true
	});
</script>
</body>
</html>
